home *** CD-ROM | disk | FTP | other *** search
Wrap
/**********************************/ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 3/6/95 */ /* */ /* This lets you select an alpha */ /* channel image to be scaled and */ /* used as a halftone pattern on */ /* the project. */ /**********************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit TYPE 8BIT menu=0 done=0 do while done=0 select when menu=0 then do 'REQUEST "Image to use for the halftone" "Spherical|Vertical|Horizontal|More.."' reply=RESULT select when reply=1 then do 'OPEN "IE:alpha/Spherical.alpha"' alphachannel=result CALL scalealpha done=1 end when reply=2 then do 'OPEN "IE:alpha/Gradient.alpha"' alphachannel=result CALL scalealpha done=1 end when reply=3 then do 'OPEN "IE:alpha/Gradient.alpha"' alphachannel=result 'ROTATE '||alphachannel||' 90 FAST' tmp=result CLOSE alphachannel alphachannel=tmp CALL scalealpha done=1 end when reply=0 then menu=1 end end when menu=1 then do 'REQUEST "Image to use for the halftone" "Diagonal|Ordered4|Wavey|More.."' reply=RESULT select when reply=1 then do 'OPEN "IE:alpha/diagonal.alpha"' alphachannel=RESULT CALL scalealpha done=1 end when reply=2 then do 'OPEN "IE:alpha/ordered4.alpha"' alphachannel=RESULT done=1 end when reply=3 then do 'OPEN "IE:alpha/wavey.alpha"' alphachannel=RESULT CALL scalealpha done=1 end when reply=0 then menu=0 end end end end MARK arg(1) PRIMARY MARK alphachannel ALPHA HALFTONE CLOSE alphachannel exit scalealpha: 'GET_NUMBER "Size in pixels" 4 256 "Ok|Cancel" 16' size=result SCALE alphachannel size size FAST temp=RESULT CLOSE alphachannel alphachannel=temp return /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end